package org.shagin.jfin.sheet;

public class SheetCell {

	private Object value = null;

	public SheetCell(Object value) {
		this.value = value;
	}

	public Object getObject() {
		return value;
	}

	public void setObject(Object value) {
		this.value = value;
	}

	public boolean isEmpty() {
		return value == null;
	}

	public Number getNumber() {
		Number result = null;
		if (isNumber()) {
			Number n = (Number) getObject();
			result = n;
		}
		return result;
	}

	public boolean isNumber() {
		return !isEmpty() && (value instanceof Number);
	}
}
